#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

#include "Auxiliary.h"
#include "na_1.h"

#define FUNC_MAX 3

int main()
{
    //init func
    MainFunc func[FUNC_MAX] = { NULL };
    func[0] = &na_11_ns::na_11;
    func[1] = &na_12_ns::na_12;
    func[2] = &na_13_ns::na_13;

    unsigned int    expNo = 0;
    bool            bExit = false; 
    char            chFlag= 0;

    do
    {
        printf("Please choose the NA experiment No. (%d ~ %d): ", 1, FUNC_MAX);
        expNo = CheckedInputInt( 1, FUNC_MAX );

		func[--expNo]();

        printf("\nContinue(c) or Exit(e)?:");
        static const char cValidChars[] = { 'c', 'e' };
        static const unsigned int cVCharsCnt = 2;
        chFlag = CheckedInputChar(cValidChars, cVCharsCnt);
        bExit = 'e' == chFlag;
    } while ( printf("\n\n"), !bExit );

	return 0;
}
